home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 20 / Cream of the Crop 20 (Terry Blount) (1996).iso / os2 / fm2utl.zip / unzipper.cmd < prev    next >
OS/2 REXX Batch file  |  1996-03-30  |  817b  |  27 lines

  1. /*
  2.  * Unzip to directory in which file resides (for WPS drag-and-drop)
  3.  * Must pass fully qualified name of zip file (d&d does)
  4.  */
  5. arg filename
  6. if length(filename) < 2 then exit
  7. call setlocal
  8. pathname = filename
  9. pathname = left(pathname,lastpos('\',pathname))
  10. if substr(pathname,length(pathname) - 1,1) \= ':' then
  11. do
  12.   pathname = left(pathname,length(pathname) - 1)
  13. end
  14. call directory pathname
  15. say '['directory()'] unzip 'filename
  16. /*
  17.  * modify this line if unzip not on PATH or is named something
  18.  * besides unzip.exe, or to add command line switches
  19.  */
  20. 'unzip 'filename
  21. /* open the folder where the file was just unzipped */
  22. call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
  23. call SysLoadFuncs
  24. call SysSetObjectData directory(), "OPEN=DEFAULT"
  25. call endlocal
  26. /* Hector wuz here */
  27.